package com.example.common.utils.result;


import lombok.Getter;
import lombok.ToString;

@Getter
@ToString
public enum ResultStatusEnum {
    SUCCESS(200, "成功", "Success"),
    FAIL(-1, "失败", "Fail"),
    ERROR(400, "错误", "Error"),
    UNKNOWN(100, "系统异常，请稍后再试。", "System exception, please try again later!"),
    ACCESS_TOKEN_NULL(401, "缺少身份认证信息，请重新登录！", "The authentication information is missing, please login again"),
    ACCESS_TOKEN_EXPIRE(401, "身份信息token已过期或不存在，请重新登录！", "Token has expired or does not exist. Please log in again!"),

            ;
    private final Integer code;
    private final String chineseDescription;
    private final String englishDescription;

    /**
     * @param code               状态码
     * @param chineseDescription 中文注释
     * @param englishDescription 英文注释
     */
    ResultStatusEnum(Integer code, String chineseDescription, String englishDescription) {
        this.code = code;
        this.chineseDescription = chineseDescription;
        this.englishDescription = englishDescription;
    }
}
